package com.example.mvvmdemo.utils

import android.content.Context

/**
 * @author Liyg
 * @description:
 * @date :2020/11/11
 */
object SizeUtils {
    fun dip2px(context:Context,dpValue:Float):Int{
        val scale = context.resources.displayMetrics.density
        return (dpValue*scale + 0.5f).toInt()
    }
}